package io.github.talelin.latticy.service.impl;

import io.github.talelin.latticy.model.LogDO;
import io.github.talelin.latticy.model.QueryLogDO;
import io.github.talelin.latticy.mapper.QueryLogMapper;
import io.github.talelin.latticy.service.QueryLogService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author generator@TaleLin
 * @since 2020-09-20
 */
@Service
public class QueryLogServiceImpl extends ServiceImpl<QueryLogMapper, QueryLogDO> implements QueryLogService {
    @Override
    public boolean createLog(String query) {
        QueryLogDO record = QueryLogDO.builder().query(query).build();
        return this.baseMapper.insert(record) > 0;
    }
}
